﻿using Models;
using Models.User;
using System;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebApplicationBase.Helper;
using BLL.User;

namespace WebApplicationBase.Controllers
{
    public class UserController : Controller
    {
        private UserService userService = new UserService();

        [HttpPost]
        public ActionResult Login(LoginUserModel model)
        {
            UserInfo userInfo = userService.login(model);

            return Json(new RESTful(userInfo), JsonRequestBehavior.AllowGet);
        }
    }
}